//
//  DBSummary.h
//  CarCare
//
//  Created by ileo on 15/4/9.
//  Copyright (c) 2015年 baozun. All rights reserved.
//

#import "DataBaseEngine.h"
#import "DataBaseModel.h"

typedef NS_ENUM(NSInteger, Summary_Type){
    Summary_DB_Day = 2,
    Summary_DB_Month = 1,
    
    Summary_Year = 1,
    Summary_Month = 2,
    Summary_Week = 3,
};

#define K_AVGMARK @"AVGMARK"
#define K_FUELPRICE @"FUELPRICE"
#define K_TOTALFUEL @"TOTALFUEL"
#define K_TOTALMILES @"TOTALMILES"

@interface SummaryReportModel : DataBaseModel

@property (nonatomic, assign) NSInteger AVGMARK;//分数
@property (nonatomic, assign) NSInteger DRIVING_COUNT;//驾驶次数
@property (nonatomic, assign) NSInteger DRIVING_TIME;//驾驶时长 (秒)
@property (nonatomic, assign) CGFloat FUELPRICE;//油费
@property (nonatomic, copy) NSString *REPORT_DATE;//日期
@property (nonatomic, assign) CGFloat TOTALFUEL;//油耗
@property (nonatomic, assign) NSInteger TOTALMILES;//公里数
@property (nonatomic, assign) NSInteger current_status;//是否异常状态

@property (nonatomic, assign) NSInteger summaryType;//类型
@property (nonatomic, copy) NSString *searchDate;//用于唯一
@property (nonatomic, assign) NSTimeInterval date;//用于搜索

@end

@interface DBSummary : DataBaseEngine

-(NSArray *)datasWithType:(Summary_Type)type;

@end